Skip to content

chore(deps): update dev dependencies, pnpm and GitHub Actions - #31

Merged
CodeDredd merged 1 commit into
mainfrom
chore/update-dev-dependencies
Nov 24, 2026
Merged

CodeDredd merged 1 commit into
mainfrom
chore/update-dev-dependencies

Conversation

@CodeDredd

Copy link
Copy Markdown
Owner

Follow-up to #30. Runtime code and the published package's dependencies are unchanged — this is tooling only (plus two typing fixes in src/helper.ts).

Versions

Rule of thumb: latest release that still runs on Node 20, because the test matrix deliberately covers the Node 20 runtime floor (and the zstd fallback). Local-only tools (lint-staged, bumpp) take their latest major.

package before after note
vitest, @vitest/coverage-v8 0.34 4.1 5.x needs Node ≥ 22.12
vite 4 8
rollup 3.28 4.68
unbuild 2 3.6
typescript 5.2 6.0 7.x is the native (Go) compiler; unbuild's .d.ts build needs the JS API. @vitest/eslint-plugin wants ≥ 6, unbuild declares ^5.9.2 — builds and declarations verified with 6.0
@nuxt/kit, @nuxt/schema 3.21 4.7 peer range for users stays ^3 || ^4
supertest / @types/supertest 6 / 2 7 / 7
lint-staged 14 17
bumpp 9 12
@antfu/ni, esno, simple-git-hooks, node-fetch-native latest
@types/node 22.20.1 22.20.5 kept on 22.x, closest to the runtime floor that has the zstd typings
playground: nuxt, @nuxt/devtools 3.7, 0.8 4.7, 4.2
rimraf, @antfu/utils, pnpm (devDep) removed unused / redundant with packageManager

pnpm 8 → 12

  • packageManager: pnpm@12.23.0, lockfile v6 → v9.
  • pnpm settings live in pnpm-workspace.yaml now (pnpm no longer reads them from .npmrc), so ignore-workspace-root-check moved there and .npmrc is gone.
  • pnpm 12 only runs approved build scripts: allowBuilds allows esbuild; simple-git-hooks stays off since the package's own prepare script installs the hooks.
  • The trustPolicy: no-downgrade added in chore(deps): update eslint to v10 and @antfu/eslint-config to v10 #30 is now active and flagged undici-types@6.21.0 (dependency of @types/node 22, published without provenance after earlier releases had it) → excluded explicitly.
  • minimumReleaseAge: pnpm auto-excluded the just-released Nuxt 4.7.0 packages; minimumReleaseAgeExcludePrune drops those entries once they're old enough.

Locally you'll need pnpm 12 (corepack enable or npm i -g pnpm@12); pnpm 8 can't read the v9 lockfile.

Code / test changes

  • Typed arrays are generic in current lib typings (Uint8Array<ArrayBufferLike>), which surfaced two real type errors in src/ (identical on TS 5.9): the native CompressionStream transform is cast like the zlib ones, and zlib's one-shot results are typed as Buffer<ArrayBuffer> so they are a valid BodyInit.
  • superagent 10 decodes brotli itself (it used to only do gzip/deflate), so the brotli tests now assert the decoded text — a successful decode proves the encoding just as well. zstd is still read raw.
  • SuperTest<Test> → TestAgent<Test> (new @types/supertest).
  • vitest typecheck → vitest --typecheck.only --run (the subcommand is gone).

CI

  • actions/checkout, actions/setup-node, pnpm/action-setup at their current majors (v3/v2 were Node 16/20 based and force-migrated with warnings). The test job uses pnpm/action-setup instead of corepack enable.
  • Codecov: the tokenless @v3 upload was already failing on every run (There was an error fetching the storage). It now uses codecov-action@v7 with OIDC (id-token: write), which needs no secret. Upload errors still don't fail the job.
  • Lint and test jobs install with pnpm install --frozen-lockfile directly instead of going through a global ni.
  • Release workflow: same action updates, Node 24 for changelogithub.

Verified locally

  • pnpm lint ✅, pnpm build ✅ (incl. .d.ts)
  • tests on h3 2.0.8 (135 passed) and 1.15.11 (31 passed)
  • playground on Nuxt 4.7 builds and serves; checked SSR page, /server/api JSON and static assets over raw HTTP for negotiation (br;q=0, gzip → gzip, gzip;q=0.1, deflate;q=0.9 → deflate, all q=0 → identity), Vary: Accept-Encoding and correct Content-Length.

Dev dependencies move to their latest releases that still run on the Node
20 runtime floor the test matrix covers:

- vitest / @vitest/coverage-v8 0.34 -> 4.1 (5.x needs Node >= 22.12)
- vite 4 -> 8, rollup 3 -> 4, unbuild 2 -> 3
- typescript 5.2 -> 6.0 (7.x is the native compiler, which unbuild's
  declaration build can't use yet)
- @nuxt/kit / @nuxt/schema 3 -> 4, supertest 6 -> 7, @types/supertest 7,
  lint-staged 17, bumpp 12, @antfu/ni 30, esno 4, simple-git-hooks,
  node-fetch-native and @types/node within 22.x
- playground: nuxt 3.7 -> 4.7, @nuxt/devtools 0.8 -> 4.2

The unused `rimraf` and `@antfu/utils` are removed, as is the redundant
`pnpm` dev dependency.

pnpm 8 -> 12: the lockfile is v9 now, and pnpm settings move from `.npmrc`
to `pnpm-workspace.yaml`. pnpm 12 only runs approved build scripts
(`allowBuilds`: esbuild) and enforces the trust policy, which needed an
exclusion for `undici-types@6.21.0`.

Source / test changes:

- Modern lib typings make typed arrays generic; the `CompressionStream`
  transform is cast like the zlib ones and zlib results are typed as
  `Buffer<ArrayBuffer>`.
- superagent 10 (via supertest 7) decodes brotli itself, so the brotli
  tests assert the decoded text; only zstd is read raw.
- `vitest typecheck` became `vitest --typecheck.only`.

CI uses actions/checkout, actions/setup-node and pnpm/action-setup at
their current majors instead of the deprecated Node 16/20 based ones, and
uploads coverage to Codecov via OIDC — the tokenless v3 upload was already
being rejected.
@CodeDredd
CodeDredd merged commit 751d750 into main Nov 24, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant